/**
 * @author lilei
 * @verison 1.0
 * @create_date 2014/04/12
 */
package com.lilei.planedic;

import com.lilei.planedic.database.AssetsDatabaseCopy;

import android.app.Activity;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.Menu;
import android.widget.TextView;

public class MainActivity extends Activity {

	public static final String tag = "MainActivity";
	
	SQLiteDatabase db ;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView button = (TextView) findViewById(R.id.textView);
        
        AssetsDatabaseCopy.initManager(this);
        AssetsDatabaseCopy assetsDatabaseCopy = AssetsDatabaseCopy.newIntance();
        if(assetsDatabaseCopy.copyAssetsToFilesystem("dic.db"))
        	button.setText(this.getPackageName());
        
	
			
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
}
